
import React,{ Component } from 'react';
import { TreeSelect } from 'antd';
const TreeNode = TreeSelect.TreeNode;


class TreeSelects extends Component {
	constructor(props) {
		super(props);
		this.state = {

		}
	}
	handleChange(value) {
		this.setState({ value })
	}
	render() {
		return (
			<TreeSelect
				value={ this.state.value }
				style={{ width: 600 }}
				dropdownStyle={{ maxHeight: 400, overflow: 'auto' }}
        		placeholder="Please select"
        		//treeDefaultExpandAll
        		showSearch
        		allowClear
        		multiple
        		onChange = { this.handleChange.bind(this)}
			>
				<TreeNode title="马振军开发组" key="0">
					<TreeNode value="开发组1" title="开发组1" key="0-1"></TreeNode>
					<TreeNode value="开发组2" title="开发组2" key="0-2"></TreeNode>
				</TreeNode>
				<TreeNode title="测试组" key="1">
					<TreeNode value="测试组1" title="测试组1" key="1-1"></TreeNode>
					<TreeNode value="测试组2" title="测试组2" key="1-2"></TreeNode>
				</TreeNode>
				<TreeNode title="工单部" key="3">
					<TreeNode value="工单部1" title="工单部1" key="3-1"></TreeNode>
					<TreeNode value="工单部2" title="工单部2" key="3-2"></TreeNode>
				</TreeNode>
				<TreeNode title="AI组" key="4">
					<TreeNode value="AI组1" title="AI组1" key="4-1"></TreeNode>
					<TreeNode value="AI组2" title="AI组2" key="4-2"></TreeNode>
				</TreeNode>
			</TreeSelect>
		)
	}
}
export default TreeSelects;